Skip to content

Conversation

mariopaja
Copy link
Contributor

@mariopaja mariopaja commented Jul 22, 2025

This PR enables SAI on STM32G4xx series by:

  1. Adding SAI1 A/B nodes
  2. Update DMA configurations for STM32G4xx
  3. Adding nucleo_g431kb in samples/drivers/i2s/output
stm32g4xx_sai

@mariopaja mariopaja mentioned this pull request Jul 22, 2025
21 tasks
@mariopaja mariopaja force-pushed the stm32g4xx_sai branch 3 times, most recently from 6b4f696 to bdb1002 Compare July 24, 2025 09:14
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@mariopaja mariopaja changed the title dts: st: g4: add sai node for stm32g4xx drivers: i2s: stm32_sai: add sai support for stm32g4xx Sep 8, 2025
@mariopaja mariopaja force-pushed the stm32g4xx_sai branch 2 times, most recently from 6b1d227 to e7eba28 Compare September 8, 2025 13:55
@mariopaja mariopaja marked this pull request as ready for review September 8, 2025 14:03
@mariopaja
Copy link
Contributor Author

@evgeniy-paltsev Do you have access to any other stm32g4xx boards for further tests?

@evgeniy-paltsev
Copy link
Contributor

Do you have access to any other stm32g4xx boards for further tests?

No, only with stm32g0, but it doesn't have sai.

Btw, I'll get a stm32u585 board soon - so I'll be able to test something on it, if needed.

@@ -0,0 +1 @@
CONFIG_HEAP_MEM_POOL_SIZE=4192
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, where do we use it?

From what I see we should do allocations from message queue (statically defined in sai driver) and from slab (statically defined in samples/drivers/i2s/output/src/main.c).

Where do we use system heap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If CONFIG_HEAP_MEM_POOL_SIZE=4192 is removed then k_msgq_alloc_init() fails

[00:00:00.000,000] <err> i2s_stm32_sai: k_msgq_alloc_init(): <FAILED>

@mariopaja mariopaja force-pushed the stm32g4xx_sai branch 2 times, most recently from 8c8fb36 to e2878b5 Compare September 11, 2025 05:10
etienne-lms
etienne-lms previously approved these changes Sep 11, 2025
Define SAI1 node A & B for STM32G4xx series

Signed-off-by: Mario Paja <[email protected]>
STM32G4xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.

Signed-off-by: Mario Paja <[email protected]>
Add nucleo_g431kb board in samples/drivers/i2s/output

Signed-off-by: Mario Paja <[email protected]>
Copy link

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 questions around dma.

@nashif nashif assigned erwango and unassigned anangl Sep 14, 2025
@kartben kartben merged commit 8fa7cbc into zephyrproject-rtos:main Oct 2, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants